package cn.wolfcode.wolf2w.business.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyRabbitConfig {

    @Bean
    public Queue strategyQueue() {
        return new Queue("strategyQueue", true, false, false);
    }

    @Bean
    public DirectExchange strategyExchange() {
        return new DirectExchange("strategyExchange", true, false);
    }

    @Bean
    public Binding startegyBinding() {
        return new Binding("strategyQueue", Binding.DestinationType.QUEUE, "strategyExchange",
                "strategyKey", null);
    }

}
